C/C++ function prototypes for Level 1 BLAS routines are provided in
<<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>, when using the default 4-byte integers, and
<<<<ssssccccssssllll____bbbbllllaaaassss____iiii8888....hhhh>>>>, when using 8-byte integers. These header files define
the complex types ssssccccssssllll____ccccoooommmmpppplllleeeexxxx and ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx, which are used in the
prototypes. Alternatively, C++ programs may declare arguments using the
types ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> and ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> from the standard template
library. But if these types are used, <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>> must be included before
<<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>> (or <<<<ssssccccssssllll____bbbbllllaaaassss____iiii8888....hhhh>>>>). Note, though, that both complex
types are equivalent: they simply represent (real, imaginary) pairs of
floating point numbers stored contiguously in memory. With the proper
casts, you can simply pass arrays of floating point data to the routines
where complex arguments are expected.
Casts, however, can be avoided. The header files <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>> and
<<<<ssssccccssssllll____bbbbllllaaaassss____iiii8888....hhhh>>>> directly support the use of user-defined complex types
or disabling prototype checking for complex arguments completely. By
defining the symbol SSSSCCCCSSSSLLLL____VVVVOOOOIIIIDDDD____AAAARRRRGGGGSSSS before including <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>> or
<<<<ssssccccssssllll____bbbbllllaaaassss____iiii8888....hhhh>>>> all complex arguments will be prototyped as vvvvooooiiiidddd ****. To
define the symbol SSSSCCCCSSSSLLLL____VVVVOOOOIIIIDDDD____AAAARRRRGGGGSSSS at compile time use the ----DDDD compiler
option (i.e., ----DDDDSSSSCCCCSSSSLLLL____VVVVOOOOIIIIDDDD____AAAARRRRGGGGSSSS) or use an explicit ####ddddeeeeffffiiiinnnneeee SSSSCCCCSSSSLLLL____VVVVOOOOIIIIDDDD____AAAARRRRGGGGSSSS
in the source code. This allows the use of any complex data structure
without warnings from the compiler, provided the structure is as
described above; that is:
1. The real and imaginary components must be contiguous in memory.
2. Sequential array elements must also be contiguous in memory.
While this allows the use of non-standard complex types without
generating compiler warnings, it has the disadvantage that the compiler
will not catch type mismatches.
Strong type checking can be enabled employing user-defined complex types
instead of SCSL's standard complex types. To do this, define
SSSSCCCCSSSSLLLL____UUUUSSSSEEEERRRR____CCCCOOOOMMMMPPPPLLLLEEEEXXXX____TTTT====_m_y__c_o_m_p_l_e_x and SSSSCCCCSSSSLLLL____UUUUSSSSEEEERRRR____ZZZZOOOOMMMMPPPPLLLLEEEEXXXX____TTTT====_m_y__z_o_m_p_l_e_x, where
_m_y__c_o_m_p_l_e_x and _m_y__z_o_m_p_l_e_x are the names of user-defined complex types.
These complex types must be defined before including the <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
* CCCCSSSSRRRROOOOTTTT*, ZZZZDDDDRRRROOOOTTTT*, CCCCRRRROOOOTTTT****, ZZZZRRRROOOOTTTT****: Applies a real plane rotation to a
pair of complex vectors.
* SSSSRRRROOOOTTTT, DDDDRRRROOOOTTTT: Applies an orthogonal plane rotation.
* SSSSRRRROOOOTTTTGGGG, DDDDRRRROOOOTTTTGGGG, CCCCRRRROOOOTTTTGGGG*, ZZZZRRRROOOOTTTTGGGG*: Constructs a Givens plane rotation.
* SSSSRRRROOOOTTTTMMMM, DDDDRRRROOOOTTTTMMMM: Applies a modified Givens plane rotation.
* SSSSRRRROOOOTTTTMMMMGGGG ,DDDDRRRROOOOTTTTMMMMGGGG: Constructs a modified Givens plane rotation.
* SSSSSSSSCCCCAAAALLLL, DDDDSSSSCCCCAAAALLLL, CCCCSSSSCCCCAAAALLLL, ZZZZSSSSCCCCAAAALLLL, CCCCSSSSSSSSCCCCAAAALLLL, ZZZZDDDDSSSSCCCCAAAALLLL: Scales a real or complex
vector.
x <- alpha x
* SSSSSSSSUUUUMMMM*, DDDDSSSSUUUUMMMM*, CCCCSSSSUUUUMMMM*, ZZZZSSSSUUUUMMMM*: Sums the elements of a real or complex
vector.
n
sum <- Sum x
i=1 i
* SSSSSSSSWWWWAAAAPPPP, DDDDSSSSWWWWAAAAPPPP, CCCCSSSSWWWWAAAAPPPP, ZZZZSSSSWWWWAAAAPPPP: Swaps two real or two complex vectors.
x <-> y
* IIIISSSSAAAAMMMMAAAAXXXX, IIIIDDDDAAAAMMMMAAAAXXXX, IIIICCCCAAAAMMMMAAAAXXXX, IIIIZZZZAAAAMMMMAAAAXXXX: Searches a vector for the first
occurrence of the maximum absolute value.
isamax <- MAX |x |
j
* IIIISSSSAAAAMMMMIIIINNNN*, IIIIDDDDAAAAMMMMIIIINNNN*: Searches a vector for the first occurrence of the
minimum absolute value.
isamin <- MIN |x |
j
* IIIISSSSMMMMAAAAXXXX*, IIIIDDDDMMMMAAAAXXXX*: Searches a vector for the first occurrence of the